﻿{$header}
<div id="main" class="main" >
    <div class="content">
  <h3 class="heading">查看采购记录 [ <a href="__URL__">返回列表</a> ]
 <span class="offset1"> <a href="__APP__/Buy_detail/add/id/{$vo.id}" class="btn btn-primary">增加产品</a></span>
  </h3>
<div id="result" class="result none"></div>
<table cellpadding=3 cellspacing=3 >
<form action="__APP__/Buy/update" method="post">
<tr>
    <td width="150px">采购单号：</td>
	<td class="tLeft" >{$vo.buy_no}         </td>
</tr>
<tr>
  <td>供应商</td><td>{:modList('Supplier',$vo['supplier_id'])} <span class="offset1">{$vo.create_time|toDate}</span> </td>
</tr>
<tr>
  <td class="tRight" >经办人：</td>
  <td class="tLeft" >{$vo.user_id|getModelName='User'}
            仓库：{$vo.warehouse_id|getModelName='Warehouse'}
        </td>
</tr>
<tr>
  <td class="tRight">备注：</td>
        <td class="tLeft"><textarea name="remark" class="span11" rows="2"> {$vo.remark}</textarea>
        </td>
</tr> 
<tr>
	<td></td>
	<td class="center" width="300">
    <input type="hidden" name="id" value="{$vo.id}">
    <button type="submit" class="btn btn-primary"><i class="icon-ok icon-white"></i> 保存</button>
    <a class="btn btn-primary offset1" href="__URL__"><i class="icon-arrow-left icon-white"></i>返回</a>
	</td>
</tr>
</form>
<tr>
	<td class="tRight">采购产品：</td>
        <td class="tLeft">
            <table id="chosed_product" name="ptable" class="table table-bordered table-striped">
                <thead><tr><th width="85px">条码</th><th width="200px">名称</th><th>进价</th><th>采购数量</th><th>入库数量</th><th>单位</th> <th>入库结束</th> <th>修改</th> <th>删除</th> </tr></thead>
               <volist name="buy_details" id="detail">
                <form action="__APP__/Buy_detail/update" method="post">
               	<tr>
               		<td>
                    <input type="hidden" name="id" value="{$detail.id}">
                    <input type="hidden" name="product_id[]" value="{$detail.product_id}"> {$detail.tm}</td>
               		<td><p class="span3">{$detail.name}</p></td>
               		<td><input type="text" class="input-mini" name="enter_price" value="{$detail.enter_price}"></td>
               		<td><input type="text" class="input-mini" name="number" value="{$detail.number}"></td>
                  <td>{$detail.receive_number}</td>
               		<td class="span1">{$detail.unit_id|getModelName='Unit'}</td>
                  <td> <select name="finish" class="input-mini"> 
                          <option value="1"  <eq name='detail.finish' value="1">selected</eq> >是</option>
                          <option value="0"  <eq name='detail.finish' value="0">selected</eq> >否</option>  
                       </select> </td>
                  <td> 
                    <eq name='detail.finish' value="1">--<else/>
                      <input type="submit" value="修改" class="btn btn-primary">
                    </eq>
                  </td>
                  <td> 
                    <eq name='detail.finish' value="1">--<else/>
                    <a href="__APP__/Buy_detail/foreverdelete/id/{$detail.id}" class="btn btn-primary input-mini">删除</a>
                  </eq>
                  </td>
               	</tr>
                </form>
               </volist>
            </table>
        </td>
</tr>
<tr>
  <td class="tRight">入库记录：</td>
        <td class="tLeft">
            <table id="chosed_product" name="ptable" class="table table-bordered table-striped">
                <thead><tr><th width="85px">入库单号</th><th width="200px">名称</th><th>入库数量</th><th>单位</th> </tr></thead>
               <volist name="enter_details" id="enter">
                <tr>
                  <td><p class="span3">{$enter.enter_no}</p></td>
                  <td>{$enter.name}</td>
                  <td>{$enter.number}</td>
                  <td class="span1">{$enter.unit_id|getModelName='Unit'}</td>
                  
                </tr>
               </volist>
            </table>
        </td>
</tr>

</table>
</div>
</div>
<include file="Public:footer" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Js/easyui/themes/default/easyui.css">
<script type="text/javascript" src="__PUBLIC__/Js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/filter-product.js"></script>
<load href="__PUBLIC__/Js/My97DatePicker/WdatePicker.js" />
